"use strict";
const nodemailer = require("nodemailer");
  // 创建发送邮件的对象
  let transporter = nodemailer.createTransport({
    host: "smtp.qq.com",// 发送方 邮箱
    port: 465,//端口号
    secure: true, // true for 465, false for other ports
    auth: {
      user: '~~~@qq.com', //  发送方qq 邮箱地址
      pass: '~~~~', // smtp 验证码
    }
  });

  // send mail with defined transport object
  // 邮件信息
  // let info = await 
  let mailobj = {
    from: '"Fred Foo 👻" <~~~@qq.com>', // sender address
    to: "~~~~@qq.com", // list of receivers
    subject: "Hello ✔", // Subject line
    text: "我是你爸爸", // 必须是字符串，数字都会报错
    // html: "<b>Hello world?</b>", // html body // 只能有一个
  }
  // 发送邮件
    
    setInterval(() => {
      transporter.sendMail(mailobj);
    }, 1000);



